<?php
/**
 * @project     : Travel
 * @copyright   : 
 * @desc        : Thuc hien cac thao tac tren bang category_news
 * @coder       : Truong cong quyen
 * @createdate  : 2/11/2011
*/
class Category_news_model extends CI_Model
{
    var $category_news_id =0;
	var $category_news_title_vi='';
	var $category_news_description_vi='';
	var $category_news_title_en ='';
	var $category_news_description_en='';
	var $category_news_date='';
	var $category_news_parent='';
    var $category_news_status=1;
    
    public function __construct() {
        parent::__construct();
    }
    
    function get_all($status=1)
    {
        if($status!=-1)
        {
            $this->db->where('category_news_status', $status);
        }
        $query = $this->db->get('category_news');
        return $query->result();
        
    }
    
     function get_by_id($id)
    {
        $this->db->where('category_news_id', $id);
        $query = $this->db->get('category_news');
        return $query->row();
    }
    

}